Skip to content

Fix htmlShadow function to handle multiple shadow effects#245

Merged
bernaferrari merged 1 commit intobernaferrari:mainfrom
team-monolith-product:fix/shadow
Jan 3, 2026
Merged

Fix htmlShadow function to handle multiple shadow effects#245
bernaferrari merged 1 commit intobernaferrari:mainfrom
team-monolith-product:fix/shadow

Conversation

@a3626a
Copy link
Contributor

@a3626a a3626a commented Jan 3, 2026

Bug Inspection

Expected

Given: Multiple shadow styles are applied

box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.11), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.07);
image

[Figure 1] Captured inside Figma


When: Generate html(styled-component) code


Then: Multiple shadow styles are included

const StyledAlertDialogue = styled.div`
  ...
  box-shadow:
    0px 0.30000001192092896px 0.8999999761581421px rgba(0, 0, 0, 0.07),
    0px 1.600000023841858px 3.5999999046325684px rgba(0, 0, 0, 0.11);
  ...
`;

Actual

Then: Single shadow style is included

const StyledAlertDialogue = styled.div`
  ...
  box-shadow: 0px 0.30000001192092896px 0.8999999761581421px rgba(0, 0, 0, 0.07);
  ...
`;
image

[Figure 2] Captured inside Figma

Fix

Refactor htmlShadow.ts to iterate over shadowEffects

Test

Tested using local Figma Desktop environment. Following video shows fixed behavior of locally developed FigmaToCode plugin.

2026-01-03.125951.mp4

@bernaferrari
Copy link
Owner

Should we also fix tailwind?

@bernaferrari
Copy link
Owner

bernaferrari commented Jan 3, 2026

Very good. Thanks!!

@bernaferrari bernaferrari merged commit 88913c2 into bernaferrari:main Jan 3, 2026
1 check passed
@a3626a a3626a deleted the fix/shadow branch January 3, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants